package com.xmx.service.impl;

import com.xmx.entity.Roles;
import com.xmx.mapper.IRolesMapper;
import com.xmx.service.IRolesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * overview：
 * author:ZhaoZH
 * 2023年05月05日 16:23
 */
@Service
public class IRolesServiceImpl implements IRolesService {
    @Autowired
    private IRolesMapper iRolesMapper;

    @Override
    public List<Roles> queryRolesByuserid(Integer id) {
        return iRolesMapper.queryRolesByuserid(id);
    }

    @Override
    public List<Roles> queryAllRoles() {
        return iRolesMapper.queryAllRoles();
    }

    @Override
    public void addNewRoles(Roles roles) {
        iRolesMapper.addNewRoles(roles);
    }

    @Override
    public Roles queryRoleByname(String name) {
        return iRolesMapper.queryRoleByname(name);
    }

    @Override
    public void deleterole(Integer rid) {
        iRolesMapper.deleterole(rid);
    }
}
